<extend name='Public/demo' />

<block name="contents">
<form class="form-horizontal" method="post" action="{:U('Competence/editdo')}">
  <h4>请为{$gtitle}选择权限</h4>
  <input type="hidden" name="gid" value="<?php echo $_GET['id'] ?>">

  <div class="form-group">
                <div class="col-md-10">
                                  <div class="checkbox" style="margin:0 0 20px 0">
                                                  <label for="exampleInputName2">管理员组名</label>
                                                  <input type="text" class="form-control" name="title" id="exampleInputName2" placeholder="请设置管理员组名" value="{$gtitle}">
                                  </div>
                </div>
                <?php $num = 2; ?>
                <?php foreach( $arr as  $val ){ ?>
                <?php
                     if($num == $val['sort']){
                            echo '<hr style="clear:both"><h5 style="clear:both;text-indent:15px; font-weight:600">'.$array[$num].'</h5>';
                            $num ++;
                     }
                 ?>
                    <div class="col-md-2">
                                      <div class="checkbox" style="margin:0 0 20px 0">
                                                    <label>
                                                      <input type="checkbox" name="com[]"  value="<?php echo $val['id'] ?>" <?php echo array_search($val['id'],$qxid)? 'checked' : '' ; ?>> <?php echo $val['title'] ?>
                                                    </label>
                                      </div>
                    </div>
                <?php } ?>
  </div>
  <div class="form-group">
    <div class=" col-sm-10">
      <button type="submit" class="btn btn-default">提交</button>
    </div>
  </div>
</form>
</block>
